<%@ page import="com.xyc.pojo.User" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>查找结果</title>
    <style>
        table, tr, td {
            border: 1px solid #ccc;
        }

        table {
            text-align: center;
        }

        .row1 td, .row2 td, .row_hover td, .paging_row td {
            padding: 5px 10px;
            color: #666666;
            border: 1px solid #CBD6DE;
        }

        .row2 td {
            background: #ffffff;
        }

        .row1 td {
            background: #eeeeee;
        }

        .row_hover td {
            background: #FBFACE;
            color: #000000;
        }

        a {
            text-decoration: none;
        }
    </style>
</head>
<body>
<div>
    <h2 style="color:blue">查找结果</h2>
    <form action="myUser" method="post">
        <table>
            <%List<User> likeList = (List<User>) session.getAttribute("likeList");%>
            <tr>
                <td>编号</td>
                <td>昵称</td>
                <td>性别</td>
                <td>年龄</td>
                <td>邮箱</td>
                <td>会员</td>
                <td>可用</td>
                <td>会员开通</td>
                <td>会员到期</td>
            </tr>
            <%
                for (int i = 0; i < likeList.size(); i++) {
                    User user = likeList.get(i);%>
            <tr class="row<%=i%2+1%>">
                <td><%=user.getUser_id()%>
                </td>
                <td><%=user.getUser_name()%>
                </td>
                <td><%=user.getSex()%>
                </td>
                <td><%=user.getAge()%>
                </td>
                <td><%=user.getEmail()%>
                </td>
                <td><%=user.getIsVip()%>
                </td>
                <td><%=user.getIsUse()%>
                </td>
                <%
                    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                    String start = sdf.format(user.getCreate_time());
                    String last = sdf.format(user.getLast_time());
                %>
                <td><%=start%>
                </td>
                <td><%=last%>
                </td>

            </tr>
            <%}%>
        </table>
        <p><input type="submit" value="返回" style="font-size:23px;color:blue;"/></p>
    </form>
</div>
</body>
</html>
